<template>
	<div id="welcome">
    <template>
      <el-table
        :data="logs"
        border
        style="width: 100%">
        <el-table-column
          align="center"
          prop="username"
          label="登入账户"
          width="180">
        </el-table-column>
        <el-table-column
          align="center"
          prop="lastLogin.ip"
          label="上次登入ip"
          width="180">
        </el-table-column>
        <el-table-column
          align="center"
          prop="lastLogin.loginTime"
          label="上次登入时间">
        </el-table-column>
        <el-table-column
          align="center"
          prop="nowLogin.ip"
          label="本次登入ip">
        </el-table-column>
        <el-table-column
          align="center"
          prop="nowLogin.loginTime"
          label="本次登入时间">
        </el-table-column>
      </el-table>
    </template>
  </div>
</template>
<script>
  import * as api from "@/api/users";
  export default {
    meta:{
      title: 'glsy',
      icon:"iconfont icon-shouye1",
    },
    // 获取登入日志
    created(){
      api.getLoginLogApi()
      .then(res=>{
        console.log(res.data.data);
        this.logs = res.data.data
      })
    },
    data() {
      return {
        logs:[]
      }
    }
  }
</script>